package routes

import (
	"fiberdemo/app/api"
	"fiberdemo/app/middleware"
	"github.com/gofiber/fiber/v2"
)

func InitRoute(app *fiber.App) {

	r := app.Group("/api", middleware.ApiAuth)
	{
		r.Get("/", api.Index.Index)
		r.Post("/nlp/createdb", api.Nlp.Creatdb)
		r.Post("/nlp/getnlp", api.Nlp.Getnlp)
		r.Post("/nlp/insert", api.Nlp.Insert)
		r.Post("/nlp/search", api.Nlp.Search)
		r.Post("/nlp/delete", api.Nlp.Delete)
		r.Post("/user/login", api.User.Login)


		r.Post("/sky/question/change", api.Sky.Change)
		r.Post("/sky/ai/search", api.Sky.Index)
		r.Get("/sky/check", api.Sky.Check)
		//r.Get("/", api.Index.Index)
		//r.Get("/", api.Index.Index)
		//r.Get("/", api.Index.Index)
	}

	// r2 := app.Group("/skypg", middleware.ApiAuth)
	// {
	// 	r2.Get("/", skypg.Index.Index)
	// 	r2.Post("/NewsList", skypg.Index.NewsList)

	// }


}
